package STO_53_2;

public class Solution {
	public int missingNumber(int[] nums) {
		int i = 0, j = nums.length - 1;
		while (i <= j) {
			int m = (i + j) / 2;
			if (m == nums[m]) {
				i = m + 1;
			} else {
				j = m - 1;
			}
		}
		return i;
	}
}
